<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%!String locale = "";%>
<%!String login = "";%>
<%!String pass = "";%>
<%
    if (request.getParameter("locale") != null)
        locale = "?locale=" + request.getParameter("locale");
    login = (String)session.getAttribute("ergosoom.login");
    pass = (String)session.getAttribute("ergosoom.pass");
%>
<% if (null != login) { %>
<script type="text/javascript">
  var Credentials = {login: "<%= login %>", pass: "<%= pass %>"};
</script>
<% } %>
<div id="header"><img src="/images/Ergo.png" height="100px" />

<div id="logo">
<h1><a id="app_name" href="/ErgoSoom.jsp<%=locale%>">Ergosoom</a></h1>


<p>Revolutionize your numerical identity</p>
</div>
<div><a href="?locale=fr"><img src="/images/fr.png"
	class="langButton" /></a><a href="?locale=en"><img src="/images/us.png"
	class="langButton" /></a></div>
<div id="logout"
	class="logout_menu<%= (null != login) ? "" : " hidden" %>"><a
	href="/_logout<%=locale%>">logout</a></div>
<!-- end #logo -->
<div id="menu">
<ul id="menu_list">
	<%
	    if (locale.contains("fr")) {
	%>
		<li><a href="/ErgoSoom.jsp<%=locale%>">Accueil</a></li>
		<li><a href="/Android.jsp<%=locale%>">Android</a></li>
		<%
		    if (null != login) {
		%>
		<li><a href="/EditProfile.jsp<%=locale%>" id="menu_editprofile">Edition</a></li>
		<li><a href="/profile/<%= login %>/<%=locale%>" id="menu_viewprofile">Profil</a></li>
		<%
            } else {
        %>
          <li><a href="/EditProfile.jsp<%=locale%>" id="id_login">Connexion</a></li>
        <% } %>
		<li id="faq"><a href="/Faq.jsp<%=locale%>">FAQ</a></li>
	<%
	    } else {
	%>
		<li><a href="/ErgoSoom.jsp<%=locale%>">Home</a></li>
		<li><a href="/Android.jsp<%=locale%>">Android</a></li>
		<%
		    if (null != login) {
		%>
		      <li><a href="/EditProfile.jsp<%=locale%>" id="menu_editprofile">Edition</a></li>
		      <li><a href="/profile/<%= login %><%=locale%>" id="menu_viewprofile">Profile</a></li>
		<%
		    } else {
		%>
		  <li><a href="/EditProfile.jsp<%=locale%>" id="id_login">Login</a></li>
		<% } %>
		<li id="faq"><a href="/Faq.jsp<%=locale%>">FAQ</a></li>
	<%
	    }
	%>
</ul>
</div>
</div>
